﻿@model IEnumerable<SoftHotel.Models.Sede>
@{
    ViewBag.Title = "Search";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using (Html.BeginForm())
{
     @Html.ValidationSummary()

    <h1><strong>Resultado Búsqueda Sedes</strong></h1>
    <br />
    <table id="buscar" rules="all" style="background-color: #BDBDBD; width: 900px; margin-bottom: 0px;" border="1">
	    <tr>
            <td>              
		        <input type="submit" name="button" value="Eliminar" />
                <input type="submit" name="button" value="Regresar" />
            </td>
	    </tr>
    </table>	

    <br />
    <br />

    
<table id="MainContent_Table2" rules="all" style="border-color: Black; width: 900px; margin-bottom: 0px;" border="1">
     <tr>	    
        <td style="font-weight: bold; width: 150px;" align="center">Nombre</td>
	    <td style="font-weight: bold; width: 140px;" align="center">Tipo</td>
	    <td style="font-weight: bold; width: 110px;" align="center">Categoría</td>
        <td style="font-weight: bold; width: 80px" align="center">Pisos</td>
	    <td style="font-weight: bold; width: 200px;" align="center">Dirección</td>
        <td style="font-weight: bold; width: 50px;" align="center"></td>
	</tr>
    @foreach (var sede in Model)
    {  
            <tr>		        
		        <td style="font-weight: normal; width: 150px;" align="left"><a href="/Sedes/Edit?id=@sede.idSede">@Html.DisplayFor(modelItem => sede.nombre)</td>
		        <td style="font-weight: normal; width: 140px;" align="center">@Html.DisplayFor(modelItem => sede.pTipo.valor)</td>
                <td style="font-weight: normal; width: 110px;" align="center">@Html.DisplayFor(modelItem => sede.pCategoria.valor)</td>
                <td style="font-weight: normal; width: 80px" align="center">@Html.DisplayFor(modelItem => sede.pisos)</td>
		        <td style="font-weight: normal; width: 200px;" align="center">@Html.DisplayFor(modelItem => sede.direccion)</td>
                <td style="font-weight: normal; width: 50px;" align="center"><a href = "/Sedes/Edit?id=@sede.idSede"><img border="0" src="@Href("~/Content/Images/edit.jpg")"></a><a href = "/Sedes/Delete?id=@sede.idSede"><img border="0" src="@Href("~/Content/Images/delete.jpg")"></a></td>
	        </tr>
    }
              
</table>
}